<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title><spring:message code="template.show"/></title>
    <meta name="decorator" content="default"/>
</head>
<body>
<c:choose>
    <c:when test="${'date' eq source.sourceType || 'time' eq source.sourceType || 'week' eq source.sourceType
                    || 'title' eq source.sourceType || 'sub' eq source.sourceType || 'weather' eq source.sourceType}">
        <div style="width: 100%;height:300px;margin-top: 100px;">
            <div style="margin:auto 10px;">
                    <span style="color: ${fns:getColor(source.color)};background-color: ${fns:getColor(source.bgcolor)};
                            test-align:${source.align};opacity: ${source.alpha};font-size: ${source.size}px; overflow: hidden;">
                            ${source.content}
                    </span>
            </div>
        </div>
    </c:when>
    <c:when test="${'alarm' eq source.sourceType}">
        <div<%-- align="center"--%>>
            <img src="${fns:getDictValue('website','website','')}${source.imgpath}" style="background-color: #B5B5B5;">
        </div>
    </c:when>
    <c:when test="${'floor' eq source.sourceType}">
        <c:if test="${'image' == source.type}">
            <div style="display: -webkit-box;">
                <div style='float:left;'><img src='${fns:getDictValue('website','website','')}${source.imgpath}' style='position: relative;background-color: #B5B5B5;'/></div>
                <div style='float:left;'><img src='${fns:getDictValue('website','website','')}${source.imgpath}' style='position: relative;background-color: #B5B5B5;'/></div>
            </div>
        </c:if>
        <c:if test="${'image' != source.type}">
            <img src="${fns:getDictLabel('basePath', 'systemvalue', '')}${source.imgpath}" style="width: ${source.width}px;height: ${source.height}px;background-color: #B5B5B5;">
        </c:if>
    </c:when>
    <c:when test="${'floored' eq source.sourceType}">
        <table style="color:${fns:getColor(source.color)};background-color: ${fns:getColor(source.bgcolor)};font-size: ${source.size}px;">
            <c:forEach var="k" begin="1" end="2" step="1">
                <tr>
                    <c:forEach var="x" begin="1" end="${source.column}" step="1">
                        <td style="width: ${source.width+source.w_space}px;line-height: ${source.lineheight+source.size}px;" align="${source.align}">88</td>
                    </c:forEach>
                </tr>
            </c:forEach>
        </table>
    </c:when>

    <c:when test="${'logo' eq source.sourceType}">
        <div style="width: 200px;height:200px;margin-top: 30px;margin-left: 30px;">
            <div style="margin:auto 10px;">
                 <img src='${fns:getDictLabel('basePath', 'systemvalue', '')}${source.imgpath}' style='width:100%;height:100%;line-height: initial;'/>
            </div>
        </div>
    </c:when>

    <c:when test="${'direction' eq source.sourceType}">
        <div style="width: 200px;height:200px;margin-top: 30px;margin-left: 30px;">
            <div style="margin:auto 10px;">
                <img src='${fns:getDictLabel('basePath', 'systemvalue', '')}${source.imgpath}' style='width:100%;height:100%;line-height: initial;background-color: #B5B5B5;'/>
            </div>
        </div>
    </c:when>

    <c:otherwise>
        <div style="width: 200px;height:200px;background-color: #9dbfc6;margin-top: 30px;margin-left: 30px;">
            <div style="margin:auto 10px;">
                <c:if test="${'floor' eq source.sourceType
                            || 'alarm' eq source.sourceType}">
                    ${source.content}
                </c:if>
            </div>
        </div>
    </c:otherwise>
</c:choose>
</body>
</html>